package shiyan2;

import java.io.*;
import java.util.Scanner;

public class shiyan2_7 {
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int[] userInput1 = {300,301,302,303,304,305 };
        try{
            DataOutputStream output = new DataOutputStream(new FileOutputStream("shiyan2_7.out"));
            DataInputStream input = new DataInputStream(new FileInputStream("shiyan2_7.out"));
            BufferedReader read = new BufferedReader(new InputStreamReader(input));
            for(int iter = 0;iter<userInput1.length;iter++){
                output.writeInt(userInput1[iter]);
            }
            int[] readint = new int[userInput1.length];
            for(int iterread = 0;iterread < userInput1.length;iterread++)
                readint[iterread] = input.readInt();
            for(int iterprint = 0;iterprint< userInput1.length;iterprint++)
                System.out.println(readint[readint.length-1-iterprint]);
        } catch (IOException e) {
            e.printStackTrace();
        }

    }
}